<?php

namespace App\Admin\Controllers;

use App\Admin\Metrics\Member;
use App\Admin\Metrics\NewTasks;
use App\Admin\Metrics\TaskProgress;
use App\Admin\Metrics\Tasks;
use App\Http\Controllers\Controller;
use Dcat\Admin\Layout\Column;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Layout\Row;

class HomeController extends Controller
{
    public function index(Content $content)
    {
        return $content
            ->header('TeamTask')
            ->description('抱石云内部人效管理平台')
            ->body(function (Row $row) {
                $row->column(6, function (Column $column) {
                    $column->row(function (Row $row) {
                        $row->column(6, view('home'));
                        $row->column(6, function (Column $column){
                            $column->row(new Member());
                            $column->row(new TaskProgress());
                        });
                    });
                });

                $row->column(6, function (Column $column) {
                    $column->row(new NewTasks());
                    $column->row(new Tasks());
                });
            });
    }
}
